(cua-paste): Use `mouse-region-match' instead of checking last-command.
authorJuri Linkov <juri@jurta.org>
Tue, 21 Aug 2007 20:05:04 +0000 (20:05 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 21 Aug 2007 20:05:04 +0000 (20:05 +0000)
lisp/emulation/cua-base.el

index 6e420b36242534545d21713fce49681d452e336d..98a9b4d63617780ef932fbea6223969167485c4a 100644 (file)
@@ -907,14 +907,11 @@ If global mark is active, copy from register or one character."
                    (setq paste-lines nil))) ;; paste all
            ;; Before a yank command, make sure we don't yank the
            ;; head of the kill-ring that really comes from the
-           ;; currently active region we are going to delete
-           ;; (when last-command is one that uses copy-region-as-kill
-           ;; or kill-new).  That would make yank a no-op.
+           ;; currently active region we are going to delete.
+           ;; That would make yank a no-op.
            (if (and (string= (filter-buffer-substring (point) (mark))
                              (car kill-ring))
-                    (memq last-command
-                          '(mouse-set-region mouse-drag-region
-                            mouse-save-then-kill mouse-secondary-save-then-kill)))
+                    (mouse-region-match))
                (current-kill 1))
            (cua-delete-region)))
       (cond